package com.app.plugin

import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.TaskAction

class MyPlugin implements Plugin<Project> {
    @Override
    void apply(Project project) {
        def hello = new Hello()
        hello.print()
        System.out.println("========================");
        System.out.println("hello world from gradle 7.4.1");
        System.out.println("========================");

        project.beforeEvaluate {
            println("before evaluate")
        }

        project.afterEvaluate {
            println("after-eva")
        }

        project.gradle.beforeSettings {
            println("before settings")
        }

        project.with {
            println("project with")
        }


        project.apply {
            println("project apply")
        }

        project.task('install') {
            doLast {
                print("hello world from plugin hello")
            }
        }

    }
}